package cn.ekgc.carddemo.service;

import cn.ekgc.carddemo.entity.Student;
import cn.ekgc.carddemo.entity.StudentExample;
import cn.ekgc.carddemo.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public void save(Student student) {
        studentMapper.insert(student);
    }

    @Override
    public void update(Student student) {
        studentMapper.updateByPrimaryKey(student);
    }

    @Override
    public void delete(int id) {
        studentMapper.deleteByPrimaryKey(id);
    }

    @Override
    public void delete(StudentExample studentExample) {
        studentMapper.deleteByExample(studentExample);
    }

    @Override
    public List<Student> list(StudentExample studentExample) {
        return null;
    }
}
